package main

import "fmt"

func main() {
	s1 := []int{1,2,3,4,5,6}
	s2 := []int{7,8,9}
	copy(s1, s2)
	fmt.Println(s1, s2)

	s3 := []int{1,2,3,4,5,6}
	s4 := []int{7,8,9}
	copy(s4, s3)
	fmt.Println(s3, s4)

	s5 := []int{1,2,3,4,5,6}
	s6 := []int{7,8,9}
	copy(s6, s5[1:3])
	fmt.Println(s5, s6)

	s7 := []int{1,2,3,4,5,6}
	s8 := []int{7,8,9}
	copy(s7[3:], s8)
	fmt.Println(s7, s8)
}